package com.imooc.pojo;

import com.baomidou.mybatisplus.annotation.*;
import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import lombok.ToString;

/**
 * 商品评价表 
 * 
 * @author yukangkang
 * @email 1304473884@qq.com
 * @date 2021-01-16 21:20:11
 */
@Data
@ToString
@TableName("items_comments")
public class ItemsComments implements Serializable {
	private static final long serialVersionUID = 1L;

		/**
		 * id主键
		 */
		@TableId(value = ID, type = IdType.AUTO)
		private String id;
		/**
		 * 用户id 用户名须脱敏
		 */
		@TableField(USER_ID)
		private String userId;
		/**
		 * 商品id
		 */
		@TableField(ITEM_ID)
		private String itemId;
		/**
		 * 商品名称
		 */
		@TableField(ITEM_NAME)
		private String itemName;
		/**
		 * 商品规格id 可为空
		 */
		@TableField(ITEM_SPEC_ID)
		private String itemSpecId;
		/**
		 * 规格名称 可为空
		 */
		@TableField(SEPC_NAME)
		private String sepcName;
		/**
		 * 评价等级 1：好评 2：中评 3：差评
		 */
		@TableField(COMMENT_LEVEL)
		private Integer commentLevel;
		/**
		 * 评价内容
		 */
		@TableField(CONTENT)
		private String content;
		/**
		 * 创建时间
		 */
		@TableField(CREATED_TIME)
		private Date createdTime;
		/**
		 * 更新时间
		 */
		@TableField(UPDATED_TIME)
		private Date updatedTime;




	public final static String ID =  "`id`";
	public final static String USER_ID =  "`user_id`";
	public final static String ITEM_ID =  "`item_id`";
	public final static String ITEM_NAME =  "`item_name`";
	public final static String ITEM_SPEC_ID =  "`item_spec_id`";
	public final static String SEPC_NAME =  "`sepc_name`";
	public final static String COMMENT_LEVEL =  "`comment_level`";
	public final static String CONTENT =  "`content`";
	public final static String CREATED_TIME =  "`created_time`";
	public final static String UPDATED_TIME =  "`updated_time`";


	public final static String ID_COMMENT =  "id主键";
	public final static String USER_ID_COMMENT =  "用户id 用户名须脱敏";
	public final static String ITEM_ID_COMMENT =  "商品id";
	public final static String ITEM_NAME_COMMENT =  "商品名称";
	public final static String ITEM_SPEC_ID_COMMENT =  "商品规格id 可为空";
	public final static String SEPC_NAME_COMMENT =  "规格名称 可为空";
	public final static String COMMENT_LEVEL_COMMENT =  "评价等级 1：好评 2：中评 3：差评";
	public final static String CONTENT_COMMENT =  "评价内容";
	public final static String CREATED_TIME_COMMENT =  "创建时间";
	public final static String UPDATED_TIME_COMMENT =  "更新时间";


	public static ItemsComments of(Object obj) {
		ItemsComments e = new ItemsComments();
		BeanUtils.copyProperties(obj, e);
		return e;
	}

	public static QueryWrapper<ItemsComments> queryWrapper(Object obj) {
		return new QueryWrapper<>(of(obj));
	}



}
